import React from 'react';
import cx from 'classnames';
import styles from './common.less';

interface ViewProps extends React.HTMLAttributes<HTMLDivElement> {
  src?: string;
  size?: number;
  // srcSvg?: string;
}

const Ico = ({ className, src, size, ...props }: ViewProps) => {
  return src ? (
    <img className={cx({}, className)} src={src} width={size} {...props} />
  ) : null;
};

Ico.defaultProps = {};

export { Ico };
